import React from 'react'
import Header from '../components/Header'
import {Outlet,useNavigate} from 'react-router-dom'
export default function Product() {
  const nav=useNavigate()
  const go=(path)=>{
     nav(path)
  }
  return (
    <div>
      <Header></Header>
      <h1>课程中心</h1>
      <div>
         <button onClick={()=>{go('/product/hot')}}>热门课程</button>
         <button onClick={()=>{go('/product/news')}}>最新课程</button>
         <button onClick={()=>{go('/product/pay')}}>付费课程</button>
         {/* 子路由出口设置 */}
         <Outlet></Outlet>
      </div>
    </div>
  )
}
